home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- Set_CDcounter(10)
- initLesson()
- CheckForTagWd()
- end
-
- on HideLastStep
- if Get_NEXT() = 3 then
- repeat with i = 1 to 6
- UpdateCursors(24 + i, 0)
- end repeat
- end if
- if the castNum of sprite 32 = the number of cast "lamp_Off" then
- UpdateCursors(32, 0)
- end if
- end
-
- on InitLamp
- set the visible of sprite 33 to 0
- set the visible of sprite 34 to 0
- UpdateCursors(34, 0)
- set the castNum of sprite 32 to the number of cast "lamp_Off"
- UpdateCursors(32, 3)
- end
-
- on unSetMouseEvents
- global puppetList
- set puppetList to []
- repeat with i = 1 to 48
- add(puppetList, the puppet of sprite i)
- if not (the puppet of sprite i) then
- set the puppet of sprite i to 1
- end if
- end repeat
- play frame "outLamp"
- end
-
- on setMouseEvents
- global puppetList
- set the mouseDownScript to EMPTY
- set the mouseUpScript to EMPTY
- set the keyDownScript to EMPTY
- set the keyUpScript to EMPTY
- repeat with i = 1 to 48
- if getAt(puppetList, i) = 0 then
- set the puppet of sprite i to 0
- end if
- end repeat
- play done
- end
-
- on dont
- dontPassEvent()
- end
-
- on HandleLamp
- sound stop 1
- sound stop 2
- if the name of cast the castNum of sprite 32 = "lamp_On" then
- set the castNum of sprite 32 to the number of cast "lamp_Off"
- set the visible of sprite 33 to 0
- set the visible of sprite 34 to 0
- UpdateCursors(34, 0)
- set the castNum of sprite 34 to the number of cast "EXITLAMP"
- updateStage()
- unSetMouseEvents()
- else
- set the castNum of sprite 32 to the number of cast "lamp_On"
- UpdateCursors(34, 3)
- set the visible of sprite 33 to 1
- set the visible of sprite 34 to 1
- updateStage()
- PlaySound("NCT01110.T01")
- displayTip(34)
- end if
- updateStage()
- end
-
- on displayTip theExitBtnSp
- global exitTheLoop
- set exitTheLoop to 0
- set the mouseDownScript to "dont"
- set the mouseUpScript to "dont"
- set the keyDownScript to "dont"
- set the keyUpScript to "dont"
- set the exitLock to 0
- repeat while not exitTheLoop
- if the mouseCast = the number of cast "EXITLAMP" then
- set the cursor of sprite 48 to [404, 405]
- else
- set the cursor of sprite 48 to [400, 401]
- end if
- if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
- switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
- end if
- end repeat
- set the exitLock to 1
- set the cursor of sprite 48 to 0
- HandleLamp()
- end
-
- on switchExitLampButt spriteNum, castDown
- global exitTheLoop
- set flag to 0
- set SaveCast to the castNum of sprite spriteNum
- set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
- repeat while the mouseDown
- set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
- end repeat
- if flag = 1 then
- set exitTheLoop to 1
- end if
- end
-
- on swapExitLampCast spriteNum, SaveCast, castDown
- if rollOver(spriteNum) then
- set the castNum of sprite spriteNum to the number of cast castDown
- updateStage()
- return 1
- else
- set the castNum of sprite spriteNum to the number of cast SaveCast
- updateStage()
- return 0
- end if
- end
-
- on TheinitCursor
- initCursorCastNum()
- initCursorList(1)
- set CursorCastNum to getCursor(2)
- cursor([CursorCastNum, CursorCastNum + 1])
- end
-
- on checkScreenStatus
- CheckRollOver()
- CheckSnakeStatus()
- go(the frame)
- end
-
- on BlinkNext
- if (the timer > getTimer()) and not soundBusy(2) then
- startTimer()
- if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
- set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
- else
- set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
- end if
- end if
- end
-
- on PressBtn theBtn
- Set_PressedLast(theBtn)
- switchButt(Get_AnsSprite() + theBtn - 1, "down" & theBtn, "HandleBtn" && theBtn)
- end
-
- on playTheTSound theTSnd
- PlaySound("NCT01110.s0" & theTSnd)
- end
-
- on GoNext
- if not get_Disabled() then
- sound stop 2
- if Get_NEXT() = 3 then
- GoNextMovie()
- else
- go("t" & Get_NEXT())
- end if
- Set_NEXT(Get_NEXT() + 1)
- end if
- end
-
- on stopMovie
- sound stop 1
- unLoad()
- setEmptyCursor()
- end
-
- on GoNextMovie
- PlaySound("GOSOUND.SO1")
- SaveHilite()
- Add_CDcounter(1)
- set cdNum to Get_CDcounter()
- set movieName to item cdNum of Get_CurrentSnakeScreens()
- go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
- end
-
- on CheckWithIn
- global WasWithIn, timeoutTimer
- repeat with theTsNum = 1 to 6
- if theTsNum <> WasWithIn then
- if (the ticks - timeoutTimer) > 120 then
- set timeoutTimer to 0
- if rollOver(24 + theTsNum) then
- set timeoutTimer to the ticks
- InitLamp()
- go("t" & 3 + theTsNum)
- set WasWithIn to theTsNum
- end if
- end if
- end if
- end repeat
- end
-
- on blinkHiLight
- if (the timer > getTimer()) and not soundBusy(2) then
- startTimer()
- if the visible of sprite 14 then
- set the visible of sprite 14 to 0
- else
- set the visible of sprite 14 to 1
- end if
- end if
- end
-